"use strict";
const common_vendor = require("../../../../../../../common/vendor.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    const pressurechart = common_vendor.ref(null);
    const pressuretype = common_vendor.ref({
      categories: ["2024-07-15", "2024-07-16", "2024-07-17", "2024-07-18", "2024-07-19", "2024-07-20", "2024-07-21"],
      data: [
        [140, 90],
        // 高压，低压
        [136, 88],
        // 高压，低压
        [144, 92],
        // 高压，低压
        [136, 90],
        // 高压，低压
        [130, 84],
        // 高压，低压
        [135, 90],
        // 高压，低压
        [140, 90]
        // 高压，低压
      ]
    });
    common_vendor.onMounted(() => {
      if (pressurechart.value) {
        const myChart = common_vendor.init(pressurechart.value);
        window.addEventListener("resize", () => {
          myChart.resize();
        });
        const option = {
          grid: {
            x: 60,
            // 左
            y: 30,
            // 上
            x2: 60,
            // 右
            y2: 30
            // 下
          },
          tooltip: {
            trigger: "axis"
          },
          legend: {
            data: ["高压", "低压"],
            top: 5,
            right: 0
          },
          xAxis: {
            data: pressuretype.value.categories
          },
          yAxis: [
            {
              type: "value"
            }
          ],
          series: [
            {
              name: "高压",
              type: "line",
              data: pressuretype.value.data.map((item) => item[0])
            },
            {
              name: "低压",
              type: "line",
              data: pressuretype.value.data.map((item) => item[1])
            }
          ]
        };
        myChart.setOption(option);
      }
    });
    return (_ctx, _cache) => {
      return {};
    };
  }
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-c3236ad9"]]);
wx.createComponent(Component);
